package cn.iocoder.yudao.module.energy.controller.admin.statistics.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Map;
import java.util.List;

/**
 * 能源统计数据 Response VO
 */
@Schema(description = "管理后台 - 能源统计数据 Response VO")
@Data
public class EnergyStatisticsRespVO {

    @Schema(description = "设备总数")
    private Integer deviceCount;

    @Schema(description = "总能耗(kWh)")
    private BigDecimal totalEnergy;

    @Schema(description = "今日上报数")
    private Integer todayReportCount;

    @Schema(description = "警告数据数量")
    private Integer warningCount;

    @Schema(description = "危险数据数量")
    private Integer dangerCount;

    @Schema(description = "环比变化率（百分比）")
    private Map<String, BigDecimal> compareRates;

    /**
     * 能耗趋势数据
     */
    @Schema(description = "能耗趋势数据")
    @Data
    public static class EnergyTrendVO {
        @Schema(description = "时间")
        private String time;

        @Schema(description = "数据类型")
        private String dataType;

        @Schema(description = "能耗值")
        private BigDecimal value;
    }

    /**
     * 能耗环比数据
     */
    @Schema(description = "能耗环比数据")
    @Data
    public static class EnergyCompareVO {
        @Schema(description = "数据类型")
        private String dataType;

        @Schema(description = "当前周期值")
        private BigDecimal currentValue;

        @Schema(description = "上一周期值")
        private BigDecimal previousValue;

        @Schema(description = "环比变化率（百分比）")
        private BigDecimal changeRate;
    }

    /**
     * 能耗分布数据
     */
    @Schema(description = "能耗分布数据")
    @Data
    public static class EnergyDistributionVO {
        @Schema(description = "名称")
        private String name;

        @Schema(description = "值")
        private BigDecimal value;
    }

    @Schema(description = "能耗趋势数据列表")
    private List<EnergyTrendVO> trendData;

    @Schema(description = "能耗环比数据")
    private List<EnergyCompareVO> compareData;

    @Schema(description = "能耗分布数据")
    private List<EnergyDistributionVO> distributionData;
} 